<%@page import="java.util.Locale"%>
<%@page import="java.util.Date"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Pay@All Confirm</title>

</head>
<body>
<form name="confirmform" action="" method="POST">
	<table>
		<tr>
			<td>URL AEON PGW Confirm</td>
			<td><input type="text" id="url" name="url" size="60" value="<%=request.getContextPath()%>/response/cash/confirm"></td>
		</tr>
		<tr>
			<td>Merchant_ID (mid)</td>
			<td><input type="text" name="mid" value="1" size="60"></td>
		</tr>
		<tr>
			<td>Merchant Transaction ID (inv)</td>
			<td><input type="text" name="inv" size="60" value="<%=request.getParameter("invoiceNo") == null ? "" : request.getParameter("invoiceNo")%>"></td>
		</tr>
		<tr>
			<td>Service Code (serviceid)</td>
			<td><input type="text" name="serviceid" value="02" size="60"></td>
		</tr>
		<tr>
			<td>Key of PAYATALL (ptransid)</td>
			<td><input type="text" name="ptransid" value="123456789" size="60"></td>
		</tr>
				<tr>
			<td>Transaction Status (status)</td>
			<td>
			<select name="status">
				<option value="A">Pending</option>
				<option value="S">Paid</option>
				<option value="E">Expired</option>
			</select>
			('A' = Pending, 'S' = Paid, 'E' = Expired)
			</td>
		</tr>
		<%
		SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.ENGLISH);
		%>
		<tr>
			<td>Payment Date (payment_date)</td>
			<td><input type="text" size="60" name="payment_date" value="<%=simpleDateFormat.format(new Date())%>"></td>
		</tr>
		<tr>
			<td>Business Date (process_date)</td>
			<td><input type="text" size="60" name=process_date value="<%=simpleDateFormat.format(new Date())%>"></td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td><input type="button" name="button" value="Submit" onclick="confirm();">(Response "F" is Fail, "S" is Success)</td>
		</tr>
	</table>
</form>
<script type="text/javascript">
	
	function confirm(){
		document.confirmform.action=document.getElementById("url").value;
		document.confirmform.submit();
		
	}
</script>
</body>
</html>